def permu(li):
    if li:
        r , h = [],[]
        for x in li:
            if x not in h:
                ts = li[:]
                ts.remove(x)
                for p in permu(ts):
                    r.append([x]+p)
            h.append(x)
        return r
    else:
        return [[]]
